﻿namespace Journey.Web.Areas.Security
{
    using System.Web.Mvc;

    /// <summary>
    /// 安全模块 WEB 区域信息配置。
    /// </summary>
    public class SecurityAreaRegistration : AreaRegistration 
    {
        /// <summary>
        /// 区域名称。
        /// </summary>
        public override string AreaName 
        {
            get 
            {
                return "Security";
            }
        }

        /// <summary>
        /// 注册区域。
        /// </summary>
        /// <param name="context">区域注册信息上下文。</param>
        public override void RegisterArea(AreaRegistrationContext context) 
        {
            context.MapRoute(
                "account.login",
                "account/login",
                new { controller = "Account", action = "Login" },
                new[] { "Journey.Web.Areas.Security.Controllers" }
            );
            context.MapRoute(
                "account.logOff",
                "account/logoff",
                new { controller = "Account", action = "LogOff" },
                new[] { "Journey.Web.Areas.Security.Controllers" }
            );
        }
    }
}